package cn.ljy.uem.web.action.frontend.mobile.course;

import cn.ljy.authority.web.controller.backstage.BaseBackstageController;
import cn.ljy.common.model.result.ResponseData;
import cn.ljy.uem.model.SchoolCourseSectionResource;
import cn.ljy.uem.model.query.SchoolCourseSectionResourceQurey;
import cn.ljy.uem.service.SchoolCourseSectionResourceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;


/**
 * 学校课程章节资源关系控制器部分
 *
 * @author 小锋
 * @date 2022/08/24
 */
@Api(tags = "后台的学校课程章节资源关系模块")
@RestController
@RequestMapping(value = "/api/mobile/schoolcoursereourcesection")
public class SchoolCourseSectionResourceMobileController extends BaseBackstageController<SchoolCourseSectionResource, SchoolCourseSectionResourceQurey, Integer> {

    @Autowired
    private SchoolCourseSectionResourceService baseService;

    @ApiOperation(value = "查询学校课程章节资源关系")
    @GetMapping("/all")
    @Override
    protected ResponseData query(SchoolCourseSectionResourceQurey schoolCourseSectionResourceQurey) {
        return super.query(schoolCourseSectionResourceQurey);
    }


    @ApiOperation(value = "读取学校课程章节资源关系信息")
    @Override
    protected ResponseData get(@PathVariable("id") Integer id) {
        return super.get(id);
    }

    @ApiOperation(value = "批量删除指定的多个学校课程章节资源关系")
    @Override
    protected ResponseData deletes(@NotEmpty(message = "操作失败：请选择要移除的记录") Integer[] ids) {
        return super.deletes(ids);
    }


    @ApiOperation(value = "添加学校课程章节资源关系")
    @Override
    protected ResponseData add(@Valid @RequestBody SchoolCourseSectionResource schoolCourseSectionResource) {
        return super.add(schoolCourseSectionResource);
    }

    @ApiOperation(value = "编辑学校课程章节资源关系")
    @Override
    protected ResponseData edit(@Valid @RequestBody SchoolCourseSectionResource schoolCourseSectionResource) {
        return super.edit(schoolCourseSectionResource);
    }


}
